/*
 * PUsuarios.java
 *
 * Created on 16 de mayo de 2006, 12:23 PM
 */

package ig.metrica.ui.seguridad;

import ejb.metrica.seguridad.entity.RolesDTO;
import ig.metrica.ui.PrincipalMetrica;
import ig.metrica.ui.interfaces.comunes.IMetodosPantallas;
import ig.metrica.ui.pantallas.comunes.ManipulacionDatos;
import ig.util.CodigoBotones;
import ig.util.MyTableModel;
import ig.util.NoContinuaException;
import java.awt.Component;
import javax.swing.JFrame;
import javax.swing.JInternalFrame;

/**
 *
 * @author  jsanchez
 */
public class PUsuarios extends javax.swing.JPanel implements IMetodosPantallas{
    private ManipulacionDatos mpd;
    private MUsuarios modelo=null;        
    private JFrame rootPanel=null;
    private MyTableModel myTableModel =null;
    private String operacion=null;
    String[] Columnas ={"ID", "Anterior", "Fecha de Cambio", "Usuario Cambio"};
    Object [][] Datos=null;
    boolean[] Editables = {false, false, false, false};        
    
    
    /** Creates new form PUsuarios */
    public PUsuarios(JFrame rootPanel) {
        this.rootPanel=rootPanel;
        myTableModel= new MyTableModel(Datos,Columnas,Editables);
        initComponents();
        mpd = new ManipulacionDatos(true,false);
        mpd.setLimpiarComponentes(true);
        mpd.setConfimacioSalir(true," ¿ Desea cerrar la ventana de creaci\u00F3n de usuarios ? ");
        mpd.setMensajeDialog(true);//muesta un JOptionpanel si ocurre algunerror cuando se ejecuta un metod heredado
        mpd.setPanelMetodosPantalla(this);
        mpd.setSize(700,350);
        mpd.setTitle("Administrador de Cuentas de usuario");        
        mpd.setMaximizable(false);        
        mpd.setResizable(false);        
        mpd.setVisible(true);
        modelo= new MUsuarios(this);
        this.setLabelNuevaCuenta();
    }

    public PUsuarios(JFrame rootPanel,boolean isCambioDeClave) throws NoContinuaException{
        this.rootPanel=rootPanel;
        myTableModel= new MyTableModel(Datos,Columnas,Editables);
        initComponents();
        mpd = new ManipulacionDatos(true,false);
        mpd.setLimpiarComponentes(true);
        mpd.setConfimacioSalir(true," ¿ Desea cerrar la ventana de creaci\u00F3n de usuarios ? ");
        mpd.setMensajeDialog(true);//muesta un JOptionpanel si ocurre algunerror cuando se ejecuta un metod heredado
        mpd.setPanelMetodosPantalla(this);
        mpd.setSize(700,350);
        mpd.setTitle("Administrador de Cuentas de usuario");
        mpd.setMaximizable(false);
        mpd.setResizable(false);
        mpd.setVisible(true);
        modelo= new MUsuarios(this);
        this.setLabelNuevaCuenta();
        this.buscar();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
    private void initComponents() {
        jLabel2 = new javax.swing.JLabel();
        TextNombre = new javax.swing.JTextField();
        jLabel3 = new javax.swing.JLabel();
        TextApellidos = new javax.swing.JTextField();
        jSeparator1 = new javax.swing.JSeparator();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jSeparator2 = new javax.swing.JSeparator();
        LUsuario = new javax.swing.JLabel();
        TextLogin = new javax.swing.JTextField();
        LClave0 = new javax.swing.JLabel();
        LClave1 = new javax.swing.JLabel();
        Password1 = new javax.swing.JPasswordField();
        Password = new javax.swing.JPasswordField();
        jLabel10 = new javax.swing.JLabel();
        LClave0Des = new javax.swing.JLabel();
        LClave1Des = new javax.swing.JLabel();
        jSeparator3 = new javax.swing.JSeparator();
        jLabel14 = new javax.swing.JLabel();
        CBoxRoles = new javax.swing.JComboBox();
        jLabel15 = new javax.swing.JLabel();
        LClave2 = new javax.swing.JLabel();
        LClave2Des = new javax.swing.JLabel();
        Password2 = new javax.swing.JPasswordField();

        jLabel2.setFont(new java.awt.Font("Dialog", 0, 12));
        jLabel2.setText("Nombres");

        TextNombre.setDisabledTextColor(new java.awt.Color(0, 0, 0));

        jLabel3.setFont(new java.awt.Font("Dialog", 0, 12));
        jLabel3.setText("Apellidos");

        TextApellidos.setDisabledTextColor(new java.awt.Color(0, 0, 0));

        jLabel5.setText("Datos del Usuario");

        jLabel6.setText("Datos de la Cuenta");

        LUsuario.setFont(new java.awt.Font("Dialog", 0, 12));
        LUsuario.setText("Usuario");

        TextLogin.setDisabledTextColor(new java.awt.Color(0, 0, 0));

        LClave0.setFont(new java.awt.Font("Dialog", 0, 12));
        LClave0.setText("Clave");

        LClave1.setFont(new java.awt.Font("Dialog", 0, 12));
        LClave1.setText("Reingresar Clave");

        Password1.setDisabledTextColor(new java.awt.Color(0, 0, 0));

        Password.setDisabledTextColor(new java.awt.Color(0, 0, 0));

        jLabel10.setFont(new java.awt.Font("Dialog", 0, 10));
        jLabel10.setForeground(new java.awt.Color(0, 0, 153));
        jLabel10.setText("Usuario de la cuenta, al menos 8 caracteres");

        LClave0Des.setFont(new java.awt.Font("Dialog", 0, 10));
        LClave0Des.setForeground(new java.awt.Color(0, 0, 153));
        LClave0Des.setText("Clave de la cuenta, al menos 8 cararteres");

        LClave1Des.setFont(new java.awt.Font("Dialog", 0, 10));
        LClave1Des.setForeground(new java.awt.Color(0, 0, 153));
        LClave1Des.setText("Igual que la Clave anterior");

        jLabel14.setFont(new java.awt.Font("Dialog", 0, 12));
        jLabel14.setText("Tipo ");

        CBoxRoles.setFont(new java.awt.Font("Dialog", 0, 12));
        CBoxRoles.setName("NO_LIMPIAR");

        jLabel15.setFont(new java.awt.Font("Dialog", 0, 10));
        jLabel15.setForeground(new java.awt.Color(0, 0, 153));
        jLabel15.setText("Tipos de cuentas, para controlar los permisos");

        LClave2.setFont(new java.awt.Font("Dialog", 0, 12));
        LClave2.setText("Reingresar Clave");

        LClave2Des.setFont(new java.awt.Font("Dialog", 0, 10));
        LClave2Des.setForeground(new java.awt.Color(0, 0, 153));
        LClave2Des.setText("Reingresar Claves anterior");

        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, jSeparator3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 532, Short.MAX_VALUE)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup()
                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                            .add(jLabel2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .add(jLabel3))
                        .add(12, 12, 12)
                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(TextNombre, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 467, Short.MAX_VALUE)
                            .add(TextApellidos, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 467, Short.MAX_VALUE)))
                    .add(org.jdesktop.layout.GroupLayout.LEADING, jSeparator1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 532, Short.MAX_VALUE)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, jLabel5)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, jSeparator2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 532, Short.MAX_VALUE)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, jLabel6)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup()
                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                            .add(jLabel14, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .add(LUsuario, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .add(LClave0, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .add(LClave1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 97, Short.MAX_VALUE)
                            .add(LClave2))
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                            .add(CBoxRoles, 0, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .add(Password)
                            .add(Password1)
                            .add(Password2)
                            .add(TextLogin, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 120, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(jLabel15, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 291, Short.MAX_VALUE)
                            .add(LClave2Des, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 291, Short.MAX_VALUE)
                            .add(LClave1Des, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 291, Short.MAX_VALUE)
                            .add(LClave0Des, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 291, Short.MAX_VALUE)
                            .add(jLabel10, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 291, Short.MAX_VALUE))))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .addContainerGap()
                .add(jLabel5)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jSeparator1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 17, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(TextNombre, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel3)
                    .add(TextApellidos, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jLabel6)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jSeparator2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(LUsuario)
                    .add(TextLogin, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jLabel10))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(LClave0)
                    .add(Password, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(LClave0Des))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(LClave1)
                    .add(Password1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(LClave1Des))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(LClave2)
                    .add(Password2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(LClave2Des))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel14)
                    .add(CBoxRoles, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 20, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jLabel15))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jSeparator3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
    }// </editor-fold>//GEN-END:initComponents

    public JInternalFrame getInternalFrame() {
        return mpd;
    }

    public void setOperacion(String operacion) {
        this.operacion = operacion;
    }

    public void validar() throws NoContinuaException {
    }

    private boolean validarDatos(){
        boolean ok=true;
        String mensaje="";
        if(this.TextLogin.getText().trim().length()<8){
            mensaje="El usuario debe tener al menos 8 caracteres";
            ok=false;
        }
        
        if(this.TextNombre.getText().trim().equals("")){
            mensaje="No se definio ningun nombre de usuario";
            ok=false;            
        }
        
        if(this.TextLogin.getText().trim().equals("")){
            mensaje="No se definio ningun usuario para la cuenta";
            ok=false;
        }
        if((this.Password.getPassword().length!=0 && this.Password.getPassword().length<8)
            ||(this.Password1.getPassword().length!=0 && this.Password1.getPassword().length<8)){
            if(this.operacion.equals("MODIFICADO") && (this.Password2.getPassword().length!=0 && this.Password2.getPassword().length<8))
                mensaje="La clave debe tener al menos 8 cararteres \u00F3 ningu caracter";
            else
                mensaje="La clave debe tener al menos 8 cararteres \u00F3 ningu caracter";
            ok=false;
        }
    
        if(!ok){
            this.mpd.showMensajeError(mensaje);
            return false;
        }else
            return true;
    }

    public void guardar() throws NoContinuaException {
       if(this.validarDatos()) {
           modelo.getUsuarioDTO().setApellidos(this.TextApellidos.getText().trim());
           modelo.getUsuarioDTO().setNomres(this.TextNombre.getText().trim());

           modelo.getCuentausuarioDTO().setUsuario(this.TextLogin.getText().trim());
               if(this.operacion.equals("MODIFICADO")){
                        modelo.getCuentausuarioDTO().setCuenta(this.modelo.getPassword(this.Password.getPassword(),this.Password1.getPassword(),this.Password2.getPassword()));
               }else if(this.operacion.equals("NUEVO"))
                    modelo.getCuentausuarioDTO().setCuenta(this.modelo.getPassword(this.Password.getPassword(),this.Password1.getPassword()));
           modelo.getRolesDTO().setId(modelo.getIdRolesDTO(this.CBoxRoles.getSelectedItem().toString()));           
           modelo.getRolesDTO().setDescripcion(null);
           modelo.getRolesDTO().setNombre(null);
           modelo.guardar();
           mpd.showMensaje("Se guardaron los cambio satisfactoriamente");
           this.mpd.setEstado(CodigoBotones.nuevo+CodigoBotones.buscar+CodigoBotones.modificar+CodigoBotones.eliminar+CodigoBotones.salir);
       }else{
           this.mpd.habilitaControles(true);
       this.mpd.setEstado(CodigoBotones.guardar+CodigoBotones.cancelar+CodigoBotones.salir);
       }
    }

    public String getOperacion() {
        return operacion.trim();
    }

    public void buscar() throws NoContinuaException {
        this.mpd.setEstado(CodigoBotones.grupoBuscarPresionado-CodigoBotones.cancelar+CodigoBotones.buscar+CodigoBotones.nuevo+CodigoBotones.eliminar);
        this.modelo.buscar();
    }

    public void modificar() throws NoContinuaException {
        this.mpd.setLimpiarComponentes(true);
        this.operacion="MODIFICADO";
        this.setLabelModificarCuenta();
    }

    public void nuevo() throws NoContinuaException {
        this.operacion="NUEVO";        
        modelo.nuevo();
        if(modelo.getNuevoUsuario()!=null && modelo.getNuevoUsuario()){
            this.mpd.setLimpiarComponentes(true);
            setLabelNuevaCuenta();
        }else if(modelo.getNuevoUsuario()!=null && !modelo.getNuevoUsuario()){
            this.mpd.setLimpiarComponentes(false);
            this.mpd.habilitaControles(true);
            setLabelNuevaCuenta();            
        }else{
            this.mpd.setLimpiarComponentes(false);
            this.mpd.habilitaControles(false);
            this.mpd.setEstado(CodigoBotones.nuevo+CodigoBotones.buscar+CodigoBotones.modificar+CodigoBotones.eliminar+CodigoBotones.salir);
        }            
    }

    public void eliminar() throws NoContinuaException {
        modelo.eliminar();
        if(modelo.getOpcion()!=null){
            this.mpd.setLimpiarComponentes(true);
            this.cleanTable();
            this.mpd.showMensaje("Se elimino el objeto seleccionado");
        }
    }

    public void salir() throws NoContinuaException {
        try {
            this.setVisible(false);
            //this.finalize();
        } catch (Throwable ex) {
            ex.printStackTrace();
        }
    }

    public void imprimir() throws NoContinuaException {
    }

    public void cancelar() throws NoContinuaException {
        System.out.println(modelo.getNuevoUsuario());
        this.mpd.setLimpiarComponentes(false);
        if(operacion==null || operacion.equals("MODIFICADO"))
           this.mpd.setEstado(CodigoBotones.buscar+CodigoBotones.eliminar+CodigoBotones.nuevo+CodigoBotones.salir+CodigoBotones.modificar);
        else
            this.mpd.setEstado(CodigoBotones.buscar+CodigoBotones.nuevo+CodigoBotones.salir);
        this.operacion=null;
        //this.cleanTable();
    }

    public Component[] getControles() {
        return null;
    }

    public void setFrame(JFrame frame) {
    }

    public JFrame getFrame() {
        return rootPanel;
    }

    void cleanTable() {
//        this.Tabla.setModel(new MyTableModel(Datos,Columnas,Editables));
//        this.Tabla.updateUI();
    }

    void updateData() {
        String[] ItemCBox= new String[modelo.getCRolesDTO().size()];        
        int i=0;
        for (Object elem : modelo.getCRolesDTO()) {
            ItemCBox[i]=((RolesDTO)elem).getNombre().trim();
            i++;
        }
        
        this.CBoxRoles.setModel(new javax.swing.DefaultComboBoxModel(ItemCBox));
        if(this.operacion==null || this.operacion.equals("MODIFICAR")){
            if(modelo.getRolesDTO()!=null)this.CBoxRoles.setSelectedItem(modelo.getRolesDTO().getNombre().trim());
//            if(modelo.getCuentausuarioDTO()!=null)this.TextID.setText(modelo.getCuentausuarioDTO().getId().toString());

            if(modelo.getUsuarioDTO()!=null)this.TextNombre.setText(modelo.getUsuarioDTO().getNomres());
            if(modelo.getUsuarioDTO()!=null)this.TextApellidos.setText(modelo.getUsuarioDTO().getApellidos());

            if(modelo.getCuentausuarioDTO()!=null)this.TextLogin.setText(modelo.getCuentausuarioDTO().getUsuario());

            if(this.modelo.getHistoriacuentasData()!=null){
//                ((MyTableModel)this.Tabla.getModel()).setData(this.modelo.getHistoriacuentasData());
//                this.Tabla.updateUI();
            }else{
                cleanTabla();
            }
                
        }else
            this.setLabelNuevaCuenta();
        
    }
public void cleanTabla(){
//        myTableModel= new MyTableModel(null,Columnas,Editables);
//        this.Tabla.setModel(myTableModel);
//        this.Tabla.updateUI();                    
}    
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JComboBox CBoxRoles;
    private javax.swing.JLabel LClave0;
    private javax.swing.JLabel LClave0Des;
    private javax.swing.JLabel LClave1;
    private javax.swing.JLabel LClave1Des;
    private javax.swing.JLabel LClave2;
    private javax.swing.JLabel LClave2Des;
    private javax.swing.JLabel LUsuario;
    private javax.swing.JPasswordField Password;
    private javax.swing.JPasswordField Password1;
    private javax.swing.JPasswordField Password2;
    private javax.swing.JTextField TextApellidos;
    private javax.swing.JTextField TextLogin;
    private javax.swing.JTextField TextNombre;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JSeparator jSeparator2;
    private javax.swing.JSeparator jSeparator3;
    // End of variables declaration//GEN-END:variables

    @Override
    public Object getObjectToXML() {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public void setObjectToXML(Object object) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public String getExtencionExportacion() {
        throw new UnsupportedOperationException("Not supported yet.");
    }    
    
    @Override
    public String getNombreExportacion() {
        throw new UnsupportedOperationException("Not supported yet.");
    }    
    
    private void setLabelNuevaCuenta(){
        this.LClave0.setText("Clave");
        this.LClave1.setText("Reingresar Clave");
        this.LClave2.setVisible(false);
        
        this.LClave0Des.setText("Clave de la cuenta, al menos 8 digitos");
        this.LClave1Des.setText("Igual que la clave anterior");
                
        this.Password2.setVisible(false);
        this.LClave2Des.setVisible(false);
        
        this.Password2.setText("");
        this.Password1.setText("");
        this.Password.setText("");
        
        this.TextLogin.setText("");
        
        this.LClave2Des.setVisible(false);        
    }
    private void setLabelModificarCuenta(){
        this.LUsuario.setText("Usuario");
        this.LClave0.setText("Clave Antigua");
        this.LClave1.setText("Nueva Clave");
        this.LClave2.setText("Reingresar Clave");
        
        this.LClave0Des.setText("Clave actual");
        this.LClave1Des.setText("Nueva clave de la cuenta");
        this.LClave2Des.setText("Reingresar la nueva clave de la cuenta");
        
        this.LClave2.setVisible(true);
        this.Password2.setVisible(true);
        this.LClave2Des.setVisible(true);        
    }        
}
